package ar.edu.unq.persistencia.Rate_me_java;

import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;

public class User {
	
	private String name;
	private String mail;
	private String password;
	private List<Event> events = new LinkedList<Event>();
	private int id;

	public User(String name, String mail, String password) {
		this.name = name;
		this.mail = mail;
		this.password = password;		
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void addEvent(Event event) {
		this.events.add(event);
		
	}

	public List<Event> getEvents() {
		return events;
	}

	public void setEvents(List<Event> events) {
		this.events = events;
	}
	
	

	public int getId() {
		return id;
	}

	private void setId(int id) {
		this.id = id;
	}

	public int TotalGlobal(Score rate) {
		int total = 0;
		for (Event event : events) {
			total = total + event.Total(rate);
		}
		return total;
	}
	
	public void createEvent(String name, Calendar date){
		new Event (name,date);
		
	}
	
	
	
	

}
